package com.dupengcheng.subject.common.enums;

import lombok.Getter;

@Getter
public enum IsDeleteEnum {


    UN_DELETE(0,"未删除"),
    DELETE(1,"已删除");

    private Integer code;


    private String desc;

    IsDeleteEnum(Integer code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static IsDeleteEnum getByCode(Integer code){
        for(IsDeleteEnum resultCodeEnum : IsDeleteEnum.values()){

            if (resultCodeEnum.getCode().equals(code)){
                return resultCodeEnum;
            }
        }
            return null;
    }
}
